#include "boardtextviewer.h"
#include "game.h"
#include "humantextplayer.h"
#include "virtualTextPlayer.h"
#include <iostream>
using std::cout;
using std::cin;
Player* select_player(Color color)
{
    cout << (color == White ? "White: ": "Black: ")
         <<"[H]uman or [C]omputer?";
    char answer;
    cin >> answer;
    if(answer == 'h' || answer == 'H')
        return new HumanTextPlayer(cout, cin, color);
    else
        return new VirtualTextPlayer(cout, color);
}
int main()
{
    Game game(select_player(Black), select_player(White));
    game.select_viewer(new BoardTextViewer(cout));
    game.play();
    return 0;
}
